{% extends "admin/layout.html" %}

{% block body %}
<div class="container">
    <h2>Users</h2>
    <table class='table table-bordered table-hover'>
        <thead>
            <tr>
                <th>Username</th>
                <th>Status</th>
                <th>Role</th>
                <th>Created Time</th>
                <th></th>
            </tr>
        </thead>
        {% for user in users %}
        <tr>
            <td>{{ user.name }}</td>
            <td>{{ user.status }}</td>
            <td>{{ user.role }}</td>
            <td>{{ user.created_time|format_date }}</td>
            <td><a href="{{ url_for('admin.user', user_id=user.id) }}">Edit</a></td>
        </tr>
        {% endfor %}
    </table>
</div>
{% endblock %}
